<!doctype html public "-//W3C//DTD HTML 4.01//EN">

<html>

   <head>
      <title>Circulation</title>
      <meta http-equiv="generator" content="PHP Designer 2005" />
      <style type="text/css">
        @import url(style.css);
      </style>
   </head>
   
   <script LANGUAGE=javascript>
    <!--
     function check()
     {
        if(document.search_form.libraryCardNo.value=="" )
        {
          alert('Please fill the search box.');
          return false;
        }
        return true;
     }
     //-->
    </script>

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" class=''>

    <form method='get' action='transactions.php' name='search_form' onSubmit="return check();">
    <table width='80%' align='center' class='content'>
        <tr><td colspan='2'><img src='images/banner.jpg' /></td></tr>
            <tr><td align='right' colspan='2' class='logout'><?php require ('loginout.php');?></td></tr>
        <tr><td>
            <table align='left' width='40%' class='bodyborder'>
                <tr class='tools'><td><a href='bookborrowed.php'>Books Borrowed</a> | <a href='bookreserved.php'>Books Reserved</a></td>
                </tr>
            </table>
            <table align='right' width='60%' class='bodyborder'>
            <?php
                $userType = $_COOKIE['userType'];
                if($userType=='superadministrator')
                {
                    echo "<tr class='tools'><td align='right'> Reserve | Cancel Reservation | Borrow | Return | <a href='mainsad.php'>Home</a></td>";
                }
                else
                {
                  echo "<tr class='tools'><td align='right'> Reserve | Cancel Reservation | Borrow | Return | <a href='main.php'>Home</a></td>";
                }
            ?>
                </tr>
            </table>
            </td>
        </tr>
        <tr><td>
            <table align='center' cellpadding='20'>
                <tr><td height='30'></td></tr>
                <tr><td>
                    <td>Library Card No. <input type='text' name='libraryCardNo' size='25'/><select name='libraryNo'>
                        <?php
                        require('db_connection.php');
                        $libraryNo=$_COOKIE['libraryNo'];

                        $query = "SELECT * FROM tbllibrary";
                        $result = mysql_query($query);
                        while ($row = mysql_fetch_array($result))
                        {
                            $libraryNo2 = $row['libraryNo'];
                            $libraryName = $row['libraryName'];
                            if($libraryNo == $libraryNo2)
                            {
                                $select = "selected='selected'";
                            }
                            else
                            {
                                $select="";
                            }
                            echo"<option value='$libraryNo2' $select >"." $libraryName "." ";
                        }
                                    ?>
                    </select>&nbsp;&nbsp;&nbsp;<input type='submit' value='OK' class='tool'></td>
                    <td></td>
                </tr>
                <tr><td height='30'></td></tr>
            </table>
            </td>
        </tr>
        <tr><td align='center' colspan='2'><?php require ('copyright.php')?></td></tr>
    </table>
    </form>
    
   </body>
</html>
